About query parameters and its capacities.
Hello,
I'm trying the capacities of fastreports.net demo with mysql and maybe integrate in a project where I work. However, I have a problem with the sql statement and parameters.
I'm wondering if I can replace any parameter with any text in a query.
For instance, this example works replacing @param1 by any number or text. It can filter the rows.
But the next example , that I'm interested, dosen't work.
In the third step of the wizard I have put, for instance, "DVDs.code = 3" in DefaultValue of @param1.
It don't crash and returns any row.
It's possible do it? If not, then I must have defined the conditions in the where clause. So I cannot create clauses in runtime.
Thank you.
Sorry for my English.
I'm trying the capacities of fastreports.net demo with mysql and maybe integrate in a project where I work. However, I have a problem with the sql statement and parameters.
I'm wondering if I can replace any parameter with any text in a query.
For instance, this example works replacing @param1 by any number or text. It can filter the rows.
select * from DVDs
where Title = @param1
But the next example , that I'm interested, dosen't work.
select * from DVDs
where @param1
In the third step of the wizard I have put, for instance, "DVDs.code = 3" in DefaultValue of @param1.
It don't crash and returns any row.
It's possible do it? If not, then I must have defined the conditions in the where clause. So I cannot create clauses in runtime.
Thank you.
Sorry for my English.
Comments
See my post regarding dynamic queries:
http://www.fast-report.com/en/forum/?p=/discussion/6363